home *** CD-ROM | disk | FTP | other *** search
/ Developer Source 6 / developer source - volume 6.iso / msysj / aug96 / dilaf105.gif < prev    next >
Graphics Interchange Format  |  1997-01-16  |  51.1 KB  |  283x502  |  4-bit (16 colors)
   ocr: Step 1: Initial assignment cstri =a "Hollo world"i CString gau a30 Hello woridid. CString alocates spaco for "Hollo worid" and fills CStringData with length and ref: count E 1. Step 2: Copy cstr2 a cstri; CString - patra 1330 Rello worldions CString cStr2 cstr2 points to same olject. as cstri. No allocation required, Just ncrement the ref count Step 3: Wodify estr2: = "Goodbye"; CString ISR Helto woridio. CString catr2 SU Goodbyelo.. When cstr2 Is modifed, a new memory object is allocated and the data copled from cstri to cstr2 before the modification is made. Ref count for cstri Is docremente ...